import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'



const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    component:  () => import('@/layout/Desktop.vue'),
    redirect: '/home',
    children: [
      {
         path:'/home',
         name:'home',
         component: ()=>import('@/views/home/Index.vue')
      } 
    ]
  },
  {
    path: '/account',
    component:  () => import('@/layout/Account.vue'),
    redirect: '/login',
    children: [
      {
        path: '/login',
        name: 'Login',
        component: () => import('../views/account/Login.vue')
      },
      {
        path: '/register',
        name: 'Register',
        component: () => import('../views/account/Login.vue')
      },
      {
        path: '/register',
        name: 'Retrieve',
        component: () => import('../views/account/Retrieve.vue')
      },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
